import request from '@/utils/request'

export function getLecturerSearch(query) {
  return request({
    url: '/lecturers/search',
    method: 'get',
    params: {
      q: query
    }
  })
}
 
export function getLecturerList(query) {
  return request({
    url: '/lecturers',
    method: 'get',
    params: query
  })
}

export function getLecturer(id) {
  return request({
    url: `lecturers/${id}/edit`,
    method: 'get'
  })
}

export function createLecturer(data) {
  return request({
    url: 'lecturers',
    method: 'post',
    data
  })
}

export function updateLecturer(id, data) {
  return request({
    url: `lecturers/${id}`,
    method: 'put',
    data
  })
}

export function deleteLecturer(id) {
  return request({
    url: `lecturers/${id}`,
    method: 'delete'
  })
}
